<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use DB;
class AppraiseController extends Controller
{
    
    public function getIndex(){


        return view('/home/appraise/appraiselist');
    }

    public function getAdd(){

        // var_dump(session('home_userid'));
        //关联查询用户所有订单信息
        $res2=DB::table("tbl_appraise")
        ->join("tbl_home_user","tbl_appraise.uid","=","tbl_home_user.id")
        ->join("tbl_goods","tbl_appraise.gid","=","tbl_goods.id")
        ->where("tbl_appraise.uid","=",session("home_userid"))
        ->where("tbl_appraise.grade","=","Null")
        ->get();
        // dd($res2);
        //跳转到评论添加页面
        return view('/home/appraise/appraiseadd',['list'=>$res2]);
    }

    //未写完增加模块
     public function postInsert(Request $request){

        dd($request->all());
        return view('/home/appraise/appraiselist');
    }

}
